<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery投票评论打分插件设置多个带动画投票评论打分效果</title>
<meta name="description" content="jquery投票评论打分插件，设置多个投票评论系统，可支持投票评论打分，带动画的投票评论打分特效。jQuery下载。" />

<link href="css/jQuery.spider.poll.css" rel="stylesheet" type="text/css" />
<style type="text/css">
*{margin:0;padding:0;}
.demo{width:600px;margin:0 auto;}
.demo .btn{padding:20px 0 20px 175px;}
</style>

<script type="text/javascript" src="../../jquery/lib/jquery.skin.js"></script>
<script type="text/javascript" src="js/jQuery.spider.poll.js"></script>
<script type="text/javascript">
var data="{root:[{id:'10000',name:'jquery图片特效',value:'50'},{id:'10001',name:'jquery导航菜单',value:'20'},{id:'10002',name:'jquery选项卡特效',value:'10'},{id:'10003',name:'jquery文字特效',value:'10'},{id:'10004',name:'jquery表单特效',value:'10'}]}"; 

var data1="{root:[{id:'10000',name:'js图片特效',value:'50'},{id:'10001',name:'js导航菜单',value:'20'},{id:'10002',name:'js选项卡特效',value:'10'},{id:'10003',name:'js文字特效',value:'10'},{id:'10004',name:'js表单特效',value:'10'}]}"; 

var data2="{root:[{id:'10000',name:'jquery特效',value:'60'},{id:'10001',name:'js特效',value:'40'}]}"; 

$(document).ready(function(){
	$("#poll_a").poll("poll1",{
		title:'jquery特效',
		titleColor:'#ff6600',
		width:'600px',
		data:data
	});
	
	$("#poll_b").poll("poll2",{
		title:'js特效',
		titleColor:'#ff0000',
		width:'600px',
		data:data1,
		showPoll:true,
		multiple:true
	});
	
	$("#poll_c").poll("poll3",{
		title:'前端脚本',
		titleColor:'blue',
		width:'600px',
		data:data2,
		multiple:false
	});
	
	$("#getPollData1").click(function (){
		$("#poll_b").getChecked().each(function (i,n){
			alert($(n).val());
		});
	});	
	$("#getPollData2").click(function (){
		$("#poll_c").getChecked().each(function (i,n){
			alert($(n).val());
		});
	});
	
});

</script>
</head>

<body>

<div class="demo">

	<div id="poll_a"></div>
	<div id="poll_b"></div>
	<div class="btn"><input type="button" id="getPollData1" value="获得第一个投票的值"/></div>
	<div id="poll_c"></div>
	<div class="btn"><input type="button" id="getPollData2" value="获得第二个投票的值"/></div>
	
</div><!--demo end-->

</body>
</html>
